import { useState, useEffect } from "react";
import { request } from "@/utils";
function useChannel() {
  let [itemList, setList] = useState([]);
  useEffect(() => {
    request("/channels").then((res) => {
      console.log(res);
      setList(res.data.channels);
    });
  }, []);
  return { itemList };
}
export { useChannel };
